/**
 * Copyright &copy; 2017-2018 <a href="http://www.webcsn.com">webcsn</a> All rights reserved.
 *
 * @author hermit
 * @date 2018-04-17 10:54:58
 */
package com.wxmp.wxcms.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wxmp.wxcms.domain.RegisterUser;
import com.wxmp.wxcms.domain.RegisterUserType;

/**
 *
 * @author fuzi
 * @version 2.0
 * @date 2018-04-17 10:54:58
 */
public interface RegisterUserDao {
	/**
	 * 根据openid查询用户
	 * @param openid
	 * @return
	 */
	public RegisterUser  getByOpenId(String openid);
	
	/**
	 * 绑定手机号
	 * @param openid
	 * @return
	 */
	public  int updatePhone(RegisterUser entity);
	
	/**
	 * 是否绑定手机号
	 * @param openid
	 * @return
	 */
	public String bindPhone(String openid);
	
	
	/**
	 * 根据用户名密码查询
	 * @param entity
	 * @return RegisterUser
	 */
    public RegisterUser getRegisterUser(RegisterUser entity);

	public RegisterUser getById(Integer id);

	public List<RegisterUser> getRegUserListByPage(RegisterUser searchEntity);
	/**
	 * 根据用户类型查询用户
	 * @param searchEntity
	 * @return
	 */
	public List<RegisterUser> getRegUserByTypeByPage(RegisterUserType searchEntity);
	
	/**
	 * 延长试用时间
	 * @param addDays 延长的天数
	 * @param openid 用户OPENID
	 * @return 受影响的行数
	 */
	public int updateUseDay(@Param("addDays") Integer addDays,@Param("openid") String openid);

	public void add(RegisterUser entity);
	
	public void update(RegisterUser entity);

	public void delete(RegisterUser entity);
	/**
     * <p>
     * 删除（根据ID 批量删除）
     * </p>
     * @param idList 主键ID列表  @Param("coll") Collection<? extends Serializable> idList
     * @return int
     */
    Integer deleteBatchIds(String [] ids);
}